using UnityEngine;

public class uiNEWcon : MonoBehaviour
{
	public static uiNEWcon instance;

	public UISprite mouseflag;

	public UISprite aimflag;

	private Vector3 disappearPos = new Vector3(-1000f, -1000f, 0f);

	private void Start()
	{
		instance = this;
	}

	private void Update()
	{
	}

	public void setposAim(Vector3 aimpos, bool istrue)
	{
		NGUITools.SetActive(aimflag.gameObject, istrue);
		if (istrue)
		{
			aimflag.transform.localPosition = new Vector3((aimpos.x - (float)(Screen.width / 2)) / GlobalInf.ratioReltoUI, (aimpos.y - (float)(Screen.height / 2)) / GlobalInf.ratioReltoUI, 0f);
		}
		else
		{
			aimflag.transform.localPosition = disappearPos;
		}
	}

	public void setmouseaim(Vector3 mousepos, bool istrue)
	{
		NGUITools.SetActive(mouseflag.gameObject, istrue);
		if (istrue)
		{
			mouseflag.transform.localPosition = new Vector3((mousepos.x - (float)(Screen.width / 2)) / GlobalInf.ratioReltoUI, (mousepos.y - (float)(Screen.height / 2)) / GlobalInf.ratioReltoUI, 0f);
		}
		else
		{
			mouseflag.transform.localPosition = disappearPos;
		}
	}
}
